<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html  xmlns="http://www.w3.org/1999/xhtml"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:p="http://primefaces.org/ui"
       xmlns:cc="http://java.sun.com/jsf/composite">
	      
	     <!--INFERFACE-->
	     <cc:interface>  
	         <cc:attribute name="label" />  
	         <cc:attribute name="labelStyle" />  
	         <cc:attribute name="textValue" />  
	         <cc:attribute name="textStyle" />       
	         <cc:attribute name="isOnlyRead" />  
	         <cc:attribute name="size" />
	         <cc:attribute name="maxlength" />
	         <cc:attribute name="maxIntegerDigits" />  
	     </cc:interface>  
	      
	     <h:outputScript library="js" name="script.js" />
	     
	     <!--IMPLEMENTATION--> 
	     <cc:implementation>  
	            
                <p:inputText rendered="#{!cc.attrs.isOnlyRead}" 
                             value="#{cc.attrs.textValue}"
                             onselect="clearOnSelect(this)" 
                             onkeypress="return(mascaraDecimal(this,'.',',',event))"
                             size="#{cc.attrs.size}"
                             maxlength="#{cc.attrs.maxlength}">
                     <f:convertNumber maxFractionDigits="2" minFractionDigits="2" maxIntegerDigits="10" type="number" currencySymbol="" />
                </p:inputText>    
                
                <h:outputText rendered="#{cc.attrs.isOnlyRead}" 
                              value="#{cc.attrs.textValue}"
                              styleClass="{cc.attrs.textStyle}">
                             <f:convertNumber maxFractionDigits="2" minFractionDigits="2" 
                                              maxIntegerDigits="11" type="number" currencySymbol="" />
                </h:outputText>
	           
	     </cc:implementation>  
     
 </html>     
